Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV: Add support for glimmer topic list #60

Merged
merged 4 commits into from
Dec 16, 2024
Merged

DEV: Add support for glimmer topic list #60

merged 4 commits into from
Dec 16, 2024

Conversation

davidtaylorhq
Copy link
Member

@davidtaylorhq davidtaylorhq commented Dec 4, 2024

This makes the theme component compatible with core's glimmer topic list, while maintaining compatibility with the raw-hbs topic list.

Some parts of the logic (e.g. the masonry layout system, and the topic-list-before-link outlet) are reimplemented in a way which works in both old and new topic-lists.

Other parts are re-implemented separately for the new topic list. For those parts, the legacy versions are isolated in the topic-thumbnails-init-legacy.js initializer for future removal.

Depends on discourse/discourse#30105

@davidtaylorhq davidtaylorhq force-pushed the modernize branch 3 times, most recently from a7f26fd to a66b7bd Compare December 4, 2024 16:36
@davidtaylorhq davidtaylorhq changed the title WIP: Reimplement for new topic list DEV: Add support for glimmer topic list Dec 4, 2024
davidtaylorhq added a commit to discourse/discourse that referenced this pull request Dec 4, 2024
This makes the theme component compatible with core's glimmer topic list, while maintaining compatibility with the raw-hbs topic list.

Some parts of the logic (e.g. the masonry layout system, and the topic-list-before-link outlet) are reimplemented in a way which works in both old and new topic-lists.

Other parts are re-implemented separately for the new topic list. For those parts, the legacy versions are isolated in the `topic-thumbnails-init-legacy.js` initializer for future removal.
davidtaylorhq added a commit to discourse/discourse that referenced this pull request Dec 4, 2024
davidtaylorhq added a commit to discourse/discourse that referenced this pull request Dec 4, 2024
davidtaylorhq added a commit to discourse/discourse that referenced this pull request Dec 5, 2024
@davidtaylorhq davidtaylorhq marked this pull request as ready for review December 5, 2024 17:36
@davidtaylorhq davidtaylorhq marked this pull request as draft December 5, 2024 17:37
@davidtaylorhq davidtaylorhq marked this pull request as ready for review December 6, 2024 00:43
davidtaylorhq added a commit to discourse/discourse that referenced this pull request Dec 6, 2024

const siteSettings = api.container.lookup("service:site-settings");
if (settings.docs_thumbnail_mode !== "none" && siteSettings.docs_enabled) {
api.modifyClass("component:docs-topic-list", {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to keep it as is or can we update it to the native class syntax?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't currently have any way to control classNameBindings via the native class syntax, so will leave it for now 😬

javascripts/discourse/components/topic-list-thumbnail.gjs Outdated Show resolved Hide resolved
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
@davidtaylorhq davidtaylorhq merged commit 5e569d4 into main Dec 16, 2024
4 checks passed
@davidtaylorhq davidtaylorhq deleted the modernize branch December 16, 2024 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants